Arteries and veins have three layers in their walls. Connective tissue composes the outer layer, muscle the middle layer, and the smooth inner lining is composed of endothelium. Veins have valves to keep blood flowing in the correct direction. Capillaries have walls that are the thickness of only one endothelial cell; this permits diffusion to occur across the wall.